<template>
    <div class="container">
        <div class="menu">
            <el-menu mode="vertical"
                     default-active="1"
                     class="el-menu-vertical-demo"
                     background-color="#d3d9df"
                     @open="handleOpen"
                     @close="handleClose"
                     style="border-radius: 10px 0px 0px 10px;">


                <router-link to="/profile/personal">
                    <el-menu-item index="1" style="height: 75px">
                        <i class="el-icon-location" style="font-size: 19px"></i>
                        <span slot="title" style="font-size: 17px">个人资料</span>
                    </el-menu-item>
                </router-link>

                <router-link to="/profile/policy">
                    <el-menu-item index="2" style="height: 75px">
                        <i class="el-icon-menu" style="font-size: 19px"></i>
                        <span slot="title" style="font-size: 17px">我的保单</span>
                    </el-menu-item>
                </router-link>

                <router-link to="/profile/health">
                    <el-menu-item index="3" style="height: 75px">
                        <i class="el-icon-document" style="font-size: 19px"></i>
                        <span slot="title" style="font-size: 17px">健康档案</span>
                    </el-menu-item>
                </router-link>

                <router-link to="/profile/messages">
                    <el-menu-item index="4" style="height: 75px">
                        <i class="el-icon-message" style="font-size: 19px"></i>
                        <span slot="title" style="font-size: 17px">个人消息</span>
                    </el-menu-item>
                </router-link>

                <router-link to="/profile/settings">
                    <el-menu-item index="5" style="height: 75px">
                        <i class="el-icon-setting" style="font-size: 19px"></i>
                        <span slot="title" style="font-size: 17px">账户设置</span>
                    </el-menu-item>
                </router-link>
            </el-menu>
        </div>

        <div class="content">
            <router-view></router-view>
        </div>
    </div>

</template>

<script>



    export default {
        components:{

        },

        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
            },
        }
    }



</script>

<style scoped>
    .container {
        display: grid;
        grid-template-columns: 250px 950px;
        grid-template-rows: 650px 100px;
        margin-top: 20px;
    }

    .menu {
        grid-row: 1 / 3;
        grid-column: 1;
        border: 3px silver solid;
        border-right-width:0px;
        background-color: #d3d9df;
        border-radius: 10px 0px 0px 10px;

    }

    .content {
        grid-row: 1 / 3;
        grid-column: 2;
        border: 3px silver solid;
        border-left-width:0px;
        border-radius: 0px 10px 10px 0px;

    }

    .el-menu-item.is-active {
        background-color: rgb(255, 255, 255) !important;
    }

</style>